<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8" />
    <title>浮动布局示例</title>
    <style>
        /* 重置默认边距和填充 */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        /* 容器：设置整体宽度并清除浮动 */
        .container {
            width: 100%;
            overflow: hidden; /* 清除浮动 */
        }

        /* 灰色块 - 左上角 */
        .gray {
            float: left;
            width: 611px;
            height: 376px;
            background-color: grey;
            margin-right: 10px; /* 右侧间距 */
        }

        /* 黄色块 - 右上角 */
        .yellow {
            float: left;
            width: 375px;
            height: 376px;
            background-color: yellow;
        }

        /* 粉色块 - 左下角 */
        .pink {
            float: left;
            width: 366px;
            height: 233px;
            background-color: pink;
            margin-top: 10px;
            margin-right: 20px;
            clear: left; /* 关键！强制换行 */
        }


        /* 蓝色块1 - 中间下方 */
        .blue1 {
            float: left;
            width: 198px;
            height: 233px;
            background-color: #0aa1ed;
            margin-top: 10px;
            margin-right: 8px;
        }

        /* 蓝色块2 - 右侧中间 */
        .blue2 {
            float: left;
            width: 198px;
            height: 233px;
            background-color: #0aa1ed;
            margin-top: 10px;
            margin-right: 8px;
        }

        /* 蓝色块3 - 最右侧 */
        .blue3 {
            float: left;
            width: 198px;
            height: 233px;
            background-color: #0aa1ed;
            margin-top: 10px;
        }
    </style>
</head>
<body>
<div class="container">
    <!-- 上排 -->
    <div class="gray"></div>
    <div class="yellow"></div>

    <!-- 下排 -->
    <div class="pink"></div>
    <div class="blue1"></div>
    <div class="blue2"></div>
    <div class="blue3"></div>
</div>
</body>
</html>
